package com.ztm.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
public class CommonController {

    @PostMapping("/upload")
    public String upload(MultipartFile file){
        String originalFilename = file.getOriginalFilename();
        System.out.println(originalFilename);

        String filePath = "文件路径:";
        return filePath + originalFilename;
    }
}
